package com.benefitj.jdbc.sql;

import com.benefitj.frameworks.cglib.SourceRoot;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.*;
import java.util.Calendar;

public interface EnhancePreparedStatement extends PreparedStatement, IStatement<EnhancePreparedStatement> {

  @Override
  default StatementRoot getRoot()  {
    return (StatementRoot) ((SourceRoot) this).getSource();
  }

  @Override
  ResultSet executeQuery(String sql);

  @Override
  int executeUpdate(String sql);

  @Override
  void close();

  @Override
  int getMaxFieldSize();

  @Override
  void setMaxFieldSize(int max);

  @Override
  int getMaxRows();

  @Override
  void setMaxRows(int max);

  @Override
  void setEscapeProcessing(boolean enable);

  @Override
  int getQueryTimeout();

  @Override
  void setQueryTimeout(int seconds);

  @Override
  void cancel();

  @Override
  SQLWarning getWarnings();

  @Override
  void clearWarnings();

  @Override
  void setCursorName(String name);

  @Override
  boolean execute(String sql);

  @Override
  ResultSet getResultSet();

  @Override
  int getUpdateCount();

  @Override
  boolean getMoreResults();

  @Override
  void setFetchDirection(int direction);

  @Override
  int getFetchDirection();

  @Override
  void setFetchSize(int rows);

  @Override
  int getFetchSize();

  @Override
  int getResultSetConcurrency();

  @Override
  int getResultSetType();

  @Override
  void addBatch(String sql);

  @Override
  void clearBatch();

  @Override
  int[] executeBatch();

  @Override
  Connection getConnection();

  @Override
  boolean getMoreResults(int current);

  @Override
  ResultSet getGeneratedKeys();

  @Override
  int executeUpdate(String sql, int autoGeneratedKeys);

  @Override
  int executeUpdate(String sql, int[] columnIndexes);

  @Override
  int executeUpdate(String sql, String[] columnNames);

  @Override
  boolean execute(String sql, int autoGeneratedKeys);

  @Override
  boolean execute(String sql, int[] columnIndexes);

  @Override
  boolean execute(String sql, String[] columnNames);

  @Override
  int getResultSetHoldability();

  @Override
  boolean isClosed();

  @Override
  void setPoolable(boolean poolable);

  @Override
  boolean isPoolable();

  @Override
  void closeOnCompletion();

  @Override
  boolean isCloseOnCompletion();

  @Override
  long getLargeUpdateCount();

  @Override
  void setLargeMaxRows(long max);

  @Override
  long getLargeMaxRows();

  @Override
  long[] executeLargeBatch();

  @Override
  long executeLargeUpdate(String sql);

  @Override
  long executeLargeUpdate(String sql, int autoGeneratedKeys);

  @Override
  long executeLargeUpdate(String sql, int[] columnIndexes);

  @Override
  long executeLargeUpdate(String sql, String[] columnNames);

  @Override
  String enquoteLiteral(String val);

  @Override
  String enquoteIdentifier(String identifier, boolean alwaysQuote);

  @Override
  boolean isSimpleIdentifier(String identifier);

  @Override
  String enquoteNCharLiteral(String val);

  @Override
  <T> T unwrap(Class<T> iface);

  @Override
  boolean isWrapperFor(Class<?> iface);

  @Override
  ResultSet executeQuery() throws SQLException;

  @Override
  int executeUpdate() throws SQLException;

  @Override
  void setNull(int parameterIndex, int sqlType) throws SQLException;

  @Override
  void setBoolean(int parameterIndex, boolean x) throws SQLException;

  @Override
  void setByte(int parameterIndex, byte x) throws SQLException;

  @Override
  void setShort(int parameterIndex, short x) throws SQLException;

  @Override
  void setInt(int parameterIndex, int x) throws SQLException;

  @Override
  void setLong(int parameterIndex, long x) throws SQLException;

  @Override
  void setFloat(int parameterIndex, float x) throws SQLException;

  @Override
  void setDouble(int parameterIndex, double x) throws SQLException;

  @Override
  void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException;

  @Override
  void setString(int parameterIndex, String x) throws SQLException;

  @Override
  void setBytes(int parameterIndex, byte[] x) throws SQLException;

  @Override
  void setDate(int parameterIndex, Date x) throws SQLException;

  @Override
  void setTime(int parameterIndex, Time x) throws SQLException;

  @Override
  void setTimestamp(int parameterIndex, Timestamp x) throws SQLException;

  @Override
  void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException;

  @Override
  void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException;

  @Override
  void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException;

  @Override
  void clearParameters() throws SQLException;

  @Override
  void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException;

  @Override
  void setObject(int parameterIndex, Object x) throws SQLException;

  @Override
  boolean execute() throws SQLException;

  @Override
  void addBatch() throws SQLException;

  @Override
  void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException;

  @Override
  void setRef(int parameterIndex, Ref x) throws SQLException;

  @Override
  void setBlob(int parameterIndex, Blob x) throws SQLException;

  @Override
  void setClob(int parameterIndex, Clob x) throws SQLException;

  @Override
  void setArray(int parameterIndex, Array x) throws SQLException;

  @Override
  ResultSetMetaData getMetaData() throws SQLException;

  @Override
  void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException;

  @Override
  void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException;

  @Override
  void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException;

  @Override
  void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException;

  @Override
  void setURL(int parameterIndex, URL x) throws SQLException;

  @Override
  ParameterMetaData getParameterMetaData() throws SQLException;

  @Override
  void setRowId(int parameterIndex, RowId x) throws SQLException;

  @Override
  void setNString(int parameterIndex, String value) throws SQLException;

  @Override
  void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException;

  @Override
  void setNClob(int parameterIndex, NClob value) throws SQLException;

  @Override
  void setClob(int parameterIndex, Reader reader, long length) throws SQLException;

  @Override
  void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException;

  @Override
  void setNClob(int parameterIndex, Reader reader, long length) throws SQLException;

  @Override
  void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException;

  @Override
  void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException;

  @Override
  void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException;

  @Override
  void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException;

  @Override
  void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException;

  @Override
  void setAsciiStream(int parameterIndex, InputStream x) throws SQLException;

  @Override
  void setBinaryStream(int parameterIndex, InputStream x) throws SQLException;

  @Override
  void setCharacterStream(int parameterIndex, Reader reader) throws SQLException;

  @Override
  void setNCharacterStream(int parameterIndex, Reader value) throws SQLException;

  @Override
  void setClob(int parameterIndex, Reader reader) throws SQLException;

  @Override
  void setBlob(int parameterIndex, InputStream inputStream) throws SQLException;

  @Override
  void setNClob(int parameterIndex, Reader reader) throws SQLException;

  @Override
  void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException;

  @Override
  void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException;

  @Override
  long executeLargeUpdate() throws SQLException;
}
